{template '_header'}
<div class='fui-page order-success-page'>

	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back" href="{php echo mobileUrl('order')}"></a>
		</div>
		<div class="title">
			{if $_GPC['result']=='seckill_refund'}
			支付失败
			{else}
			支付成功
			{/if}

		</div>
		<div class="fui-header-right" data-nomenu="true">&nbsp;</div>
	</div>

    <div class='fui-content'>
	
	<div class='fui-list-group result-list ' style="margin-top: 0;">
	    <div class='fui-list'>
		<div class='fui-list-media'>
			{if $_GPC['result']=='seckill_refund'}
					<i class='icon icon-cry'></i>
			{else}
		                   {if !empty($address)}<i class='icon icon-deliver'></i>{/if}
			
			{if !empty($order['dispatchtype']) && empty($order['isverify'])}<i class='icon icon-store'></i>{/if}
			
			{if !empty($order['isverify'])}<i class='icon icon-store'></i>{/if}
			
			{if !empty($order['virtual'])}<i class='icon icon-text'></i>{/if}
			
			{if !empty($order['isvirtual']) && empty($order['virtual'])}
			    {if !empty($order['isvirtualsend'])}
			    <i class='icon icon-text'></i>
			    {else}
			    <i class='icon icon-check'></i>
			    {/if}
			{/if}
			{/if}
			
		     </div>
		<div class='fui-list-inner'>
		    <div class='title'>
				{if $_GPC['result']=='seckill_refund'}
				订单支付失败
				{else}
				{if $order['paytype']==3}
				订单提交支付
				{else}
				订单支付成功
				{/if}
				{/if}

		    </div>
		    <div class='text'>

				{if $_GPC['result']=='seckill_refund'}
				 支付超时，秒杀失败，系统会自动退款，如果未收到退款，请联系客服!
				{else}


			{if !empty($address)}您的包裹整装待发{/if}
			
			{if !empty($order['dispatchtype']) && empty($order['isverify'])}您可以到您选择的自提点取货了{/if}
			
			{if !empty($order['isverify'])}您可以到适用门店去使用了{/if}
			
			{if !empty($order['virtual'])}您购买的商品已自动发货{/if}
			
			{if !empty($order['isvirtual']) && empty($order['virtual'])}
			     {if !empty($order['isvirtualsend'])}
			         您购买的商品已自动发货
			    {else}
			         您已经支付成功
			    {/if}
			{/if}
				{/if}
	
		    </div>
		</div>
	    </div>
	</div>
	
	{if !empty($stores)}
	<script language='javascript' src='http://api.map.baidu.com/api?v=2.0&ak=ZQiFErjQB7inrGpx27M1GR5w3TxZ64k7'></script>
	<div class='fui-according-group'>
	<div class='fui-according'>
	    <div class='fui-according-header'>
		<i class='icon icon-shop'></i>
		<span class="text">适用门店</span>
		<span class="remark"><div class="badge">{php echo count($stores)}</div></span>
	    </div>
	   <div class="fui-according-content store-container">
		 {loop $stores $item}
			<div  class="fui-list store-item" 
		      
		      data-lng="{php echo floatval($item['lng'])}"
		      data-lat="{php echo floatval($item['lat'])}">
		    <div class="fui-list-media">
			<i class='icon icon-shop'></i>
		    </div>
		    <div class="fui-list-inner store-inner">
			<div class="title"> <span class='storename'>{$item['storename']}</span></div>
			<div class="text">
			    <span class='realname'>{$item['realname']}</span> <span class='mobile'>{$item['mobile']}</span>
			</div>
			<div class="text">
			    <span class='address'>{$item['address']}</span>
			</div>
			<div class="text location" style="color:green;display:none">正在计算距离...</div>
		    </div> 
		     <div class="fui-list-angle ">
			 {if !empty($item['tel'])}<a href="tel:{$item['tel']}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>{/if}
			 <a href="{php echo mobileUrl('store/map',array('id'=>$item['id'],'merchid'=>$item['merchid']))}" class='external' ><i class='icon icon-location' style='color:#f90'></i></a>
  		      </div>
		</div> 
			{/loop}
		</div>
	 
	<div id="nearStore" style="display:none">
		 
		<div class='fui-list store-item'   id='nearStoreHtml'></div>
	</div>
	</div></div>
	{/if}
	{if !empty($address)}
	 
	<div class='fui-list-group' style='margin-top:5px;'>
	    <div class='fui-list'>
		<div class='fui-list-media'><i class='icon icon-location'></i></div>
		<div class='fui-list-inner'>
		    <div class='title'>{$address['realname']} {$address['mobile']}</div>
		    <div class='text'>{$address['province']}{$address['city']}{$address['area']} {$address['address']}</div>
		</div>
	    </div>
	</div>
	{/if}
	
	{if !empty($carrier) || !empty($store)}
	 
	<div class='fui-list-group' style='margin-top:5px;'>
	        {if !empty($carrier)}
	    <div class='fui-list'>
		<div class='fui-list-media'><i class='icon icon-person2'></i></div>
		<div class='fui-list-inner'>
		    <div class='title'>{$carrier['carrier_realname']} {$carrier['carrier_mobile']}</div>
		</div>
	    </div>
		{/if}
	    
	    {if !empty($store)}
	       <div  class="fui-list" >
		    <div class="fui-list-media">
			<i class='icon icon-shop'></i>
		    </div>
		    <div class="fui-list-inner store-inner">
			<div class="title"> <span class='storename'>{$store['storename']}</span></div>
			<div class="text">
			    <span class='realname'>{$store['realname']}</span> <span class='mobile'>{$store['mobile']}</span>
			</div>
			<div class="text">
			    <span class='address'>{$store['address']}</span>
			</div>
		    </div> 
		     <div class="fui-list-angle ">
			 {if !empty($store['tel'])}<a href="tel:{$store['tel']}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>{/if}
			 <a href="{php echo mobileUrl('store/map',array('id'=>$store['id'],'merchid'=>$store['merchid']))}" class='external' ><i class='icon icon-location' style='color:#f90'></i></a>
  		      </div>
		</div> 
	    {/if}
	</div>
	{/if}
	
	
	<div class="fui-cell-group">
	    <div class="fui-cell">
		<div class="fui-cell-label">{if $order['paytype']==3}需到付{else}实付金额{/if}</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark"><span class='text-danger'>￥{php echo number_format($order['price'],2)}</span></div>
	    </div>
		{if $_GPC['result']!='seckill_refund'}
	{if !empty($order['virtual']) || !empty($order['isvirtualsend'])}
	 
	    <div class="fui-cell">
		
		<div class="fui-cell-remark noremark" style='width:auto;'>请到订单详情中查看详细信息</div>
		
	    </div>
 
	{/if}
		{/if}
	</div>
	 
	<div class='row'>
	    <div class='col-50'>
		<a class="btn btn-default external" href="{php echo mobileUrl('order/detail',array('id'=>$order['id']))}" >订单详情</a>
	    </div>
	    <div class='col-50'>
		<a class="btn btn-default external" href="{php echo mobileUrl()}" >返回首页</a>
	    </div>
	</div>
	 
    </div>
	    <script language='javascript'>require(['biz/order/success'], function (modal) {modal.init(); });</script>
</div>
{template '_footer'}